package com.haipumi.biz.impl;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.haipumi.biz.ExchangeListBiz;
import com.haipumi.mapper.ExchangeListMapper;

@Service("exchangeListBizImpl")
public class ExchangeListBizImpl implements ExchangeListBiz {

	@Autowired
	private ExchangeListMapper exchangeListMapper;
	
	@Override
	public int insertExchange(String uid,String pid, String elidentity, String elway) {
		Map<String,Object> map=new HashMap<String ,Object>();
		map.put("elid", Integer.parseInt(uid));
		map.put("eltime", new Date());
		map.put("pid", Integer.parseInt(pid));
		map.put("elidentity", Integer.parseInt(elidentity));
		map.put("elway", Integer.parseInt(elway));
		return exchangeListMapper.insertExchange(map);
	}

}
